package lovemusic.lanou.com.newsmusic.ui.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 音乐界面fragment的适配器
 * Created by lanouhn on 2016/9/29.
 */
public class Music_viewpager_adapter extends FragmentPagerAdapter{

    private List<Fragment> fragments;
    public Music_viewpager_adapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
